package cn.fy.appcode.service;

import android.app.IntentService;
import android.content.Intent;
import android.content.Context;
import android.util.Log;

public class MyIntentService extends IntentService {

    public MyIntentService() {
        super("MyIntentService");
    }

    @Override
    protected void onHandleIntent(Intent intent) {
        Log.e(getClass().getName(), "onHandleWork");
        for (int i = 0; i < 3; i++) {
            try {
                Log.e(getClass().getName(), "Number:开始"+i);
                Thread.sleep(10000);
                Log.e(getClass().getName(), "Number:结束"+i);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        Log.e(getClass().getName(), "onDestroy");
    }
}